package com.company.proxy.v02;

import java.util.Random;

public class Tank implements MoveAble {
/*
模拟坦克的移动时间
 */

    @Override
    public void move() {
        long start = System.currentTimeMillis();
        System.out.println("tank moving calacalacala");
        try {
            Thread.sleep(new Random().nextInt(10000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        long end = System.currentTimeMillis();
        System.out.println("跑了" + (end - start) + "秒");
    }

    public static void main(String[] args) {
        new Tank().move();
    }


}

interface MoveAble {
    void move();
}